using System.Collections.Generic;
using UnityEngine;

namespace ZFramework.Runtime
{
    public interface IEntityGroup
    {
        string Name { get; }

        GameObject Root { get; }

        int EntityCount { get; }

        float InstanceAutoReleaseInterval { get; set; }

        int InstanceCapacity { get; set; }

        /// <summary>
        /// 获取或设置实体组实例对象池对象过期秒数。
        /// </summary>
        float InstanceExpireTime { get; set; }

        /// <summary>
        /// 获取或设置实体组实例对象池的优先级。
        /// </summary>
        int InstancePriority { get; set; }

        bool HasEntity(int entityId);

        bool HasEntity(string entityAssetName);

        Entity GetEntity(int entityId);

        Entity GetEntity(string entityAssetName);

        Entity[] GetEntities(string entityAssetName);

        void GetEntities(string entityAssetName, List<Entity> results);

        Entity[] GetAllEntities();

        void GetAllEntities(List<Entity> results);
    }
}
